//			CONFLICT EXPOSURE AND EXPECTED VICTIMIZATION IN KADUNA,  NIGERIA.

									*Daniel Tuki*
						
// This study relies mainly on large-N survey data collected from the Northern Nigerian state of Kaduna as part of the Transnational perspectives on Migration and Integration (TRANSMIT) research project. For more information on the project, visit: https://www.projekte.hu-berlin.de/en/transmit
						
						
						
//				Dependent variables
				
* Expected victimization (clashfuture): measures the respondents' expectation that they will be directly affected by violence in a year's time. 
codebook clashfuture
tab clashfuture

* Expected victimization (binary) (bin_clashfuture): This is a reduced form of the preceding variable where I coded the "Somewhat likely" and "Very likely" response categoies as 1, and the "Neutral - the same" "Somewhat unlikely" and "Very unlikely" response categories as 0. 
gen bin_clashfuture = 0
replace bin_clashfuture = 1 if clashfuture == 4
replace bin_clashfuture = 1 if clashfuture == 3
replace bin_clashfuture = . if clashfuture == .


* Cultural salience (cultural_salience): This is derived from the variable "importancevalues" where respondents were asked which aspect of their identity was most important to them: ethnicity, religion, nationality, and whether they are equally important. The cultural salience variable ius a dummy that takes the value of 1 if respondents chose either their religion or ethnicity, and 0 otherwise. 
codebook importancevalues
tab importancevalues
gen cultural_salience = 0
replace cultural_salience = 1 if importancevalues == 1
replace cultural_salience = 1 if importancevalues == 2
replace cultural_salience = . if importancevalues == . 		



//				Explanatory variables
				
* Violent conflict (10 km): This measures the total number of violent conflict incidents within a 10 km radius around the respondents' dwellings. This variable was developed using QGIS sortware to integrate the TRANSMIT and Armed Conflict location and Events Data project (ACLED) datasets. This was posssible because both datasets are geocoded. Alternative versions of this variable based on the Uppsala Conflict Data Proigram's Georeferenced Events Dataset (UCDP-GED) and data from the Global Terrorism Database (GTD), were developed. 



//				Control variables
				
* Past victimization (vioaffected): This is a dummy variable that takes the value of 1 if the respondent or a family member has been directly affected by violence during the past decade and 0 otherwise. 
codebook vioaffected
tab vioaffected

* State capacity (trustpolice): This measures the degree to which respondents think the police is playing their role in providing security. 
codebook  trustpolice
tab trustpolice

* Gun proliferation (armscommon): This measures respondents perceptions of the proliferation of weapons
codebook armscommon
tab armscommon

* Household income (hhecon): This measures the socioeconomic condition of the household in which the respondent resides on a scale with five ordinal categories ranging from "Money is not enough for food" to "We can afford to buy almost anything."
codebook hhecon
tab hhecon

* Demographic Covariates: This includes the religious affiliation, age, gender, and marital status of the respondents. 
tab gender1 
tab age1
tab married
tab relig



//	Table 1: Summary Statistics

summ clashfuture bin_clashfuture cultural_salience acled_vio_incid_10km acled_vio_incid_5km ucdp_10km ucdp_5km gtd_10km gtd_5km vioaffected trustpolice armscommon hhecon relig age1 gender1 married cultural_salience




//						REGRESSION RESULTS

//	Table 2: Ordered logit models regressing expected victimization on violent conflict

* Model 1: Ologit - baseline
ologit clashfuture acled_vio_incid_10km, vce(robust)	
* To check the AIC statistic 
estat ic

* Model 2: Ologit - Adding controls for past victimization, state capacity & gun proliferation
ologit clashfuture acled_vio_incid_10km vioaffected trustpolice armscommon, vce(robust)
* To check the AIC statistic 
estat ic

* Model 3: Ologit - Adding controls for household income and demographic characteristics (full model)
ologit clashfuture acled_vio_incid_10km vioaffected trustpolice armscommon hhecon relig age1 gender1 married, vce(robust)
* To check the AIC statistic 
estat ic

* Model 4: OLS - Robustness check using ordinary least squares regression (full model)
regress clashfuture acled_vio_incid_10km vioaffected trustpolice armscommon hhecon relig age1 gender1 married, vce(robust)
* To check the AIC statistic 
estat ic

* Model 5: Ologit - Robustness check using UCDP dataset (full model)
ologit clashfuture ucdp_10km vioaffected trustpolice armscommon hhecon relig age1 gender1 married, vce(robust)
* To check the AIC statistic 
estat ic

* Model 6: Ologit - Robustness check using GTD dataset (full model)
ologit clashfuture gtd_10km vioaffected trustpolice armscommon hhecon relig age1 gender1 married, vce(robust)
* To check the AIC statistic 
estat ic



// 	Average marginal effects of violent conflict on expected victimization, and linear predictions of expected victimization

* Panel A: Ologit - based on Model 3
ologit clashfuture acled_vio_incid_10km vioaffected trustpolice armscommon hhecon relig age1 gender1 married, vce(robust)
* To obtain the marginal effects
margins, dydx(acled_vio_incid_10km)
* To plot the marginal effects as a bar chart with confidence intervals
marginsplot, recast(bar) yline(0) name (acled_logit, replace)

* Panel B: OLS - based on Model 4
regress clashfuture acled_vio_incid_10km vioaffected trustpolice armscommon hhecon relig age1 gender1 married, vce(robust)
* To obtain the linear margins plot for conflicts ranging from 0 to 15, at intervals of 25:
margins, at(acled_vio_incid_10km=(0(25)150))
* To plot the linear margins: 
marginsplot,  name (acled_ols, replace)

* To combine the two graphs
graph combine acled_logit acled_ols



// 	Table 3: LPM models regressing cultural salience on violent conflict

* Model 1: LPM - Baseline - Ethnoreligious salience
regress cultural_salience acled_vio_incid_10km, vce(robust)	
* To check the AIC statistic 
estat ic

* Model 2: LPM - Adding controls for past victimization, state capacity, and gun proliferation
regress cultural_salience acled_vio_incid_10km vioaffected trustpolice armscommon, vce(robust)	
* To check the AIC statistic 
estat ic

* Model 3: LPM - Adding controls for household income and demographic characteristics (full model)
regress cultural_salience acled_vio_incid_10km vioaffected trustpolice armscommon hhecon relig age1 gender1 married, vce(robust)	
* To check the AIC statistic 
estat ic

* Model 4: LPM - UCDP (full model)
regress cultural_salience ucdp_10km vioaffected trustpolice armscommon hhecon relig age1 gender1 married, vce(robust)	
* To check the AIC statistic 
estat ic

* Model 5: LPM - GTD (full model)
regress cultural_salience gtd_10km vioaffected trustpolice armscommon hhecon relig age1 gender1 married, vce(robust)	
* To check the AIC statistic 
estat ic


// Linear predictions of cultural salience
* Based on Model 3 in Table 3:
regress cultural_salience acled_vio_incid_10km vioaffected trustpolice armscommon hhecon relig age1 gender1 married, vce(robust)
* To obtain the linear margins plot for conflicts ranging from 0 to 15, at intervals of 25:
margins, at(acled_vio_incid_10km=(0(25)150))
* To plot the linear margins: 
marginsplot,  name (acled_salience, replace)		
			
			
			
			
			
			
			
//						APPENDIX

// 	Table A1: Replicating the results in Table 2 using 5km buffer

* Model 1: Ologit - baseline
ologit clashfuture acled_vio_incid_5km, vce(robust)	
*To check the AIC statistic 
estat ic

* Model 2: Ologit - Adding controls for past victimization, state capacity & gun proliferation
ologit clashfuture acled_vio_incid_5km vioaffected trustpolice armscommon, vce(robust)
* To check the AIC statistic 
estat ic

* Model 3: Ologit - Adding controls for household income and demographic characteristics (full model)
ologit clashfuture acled_vio_incid_5km vioaffected trustpolice armscommon hhecon relig age1 gender1 married, vce(robust)
* To check the AIC statistic 
estat ic

* Model 4: OLS - Robustness check using oordered logit regression (full model)
regress clashfuture acled_vio_incid_5km vioaffected trustpolice armscommon hhecon relig age1 gender1 married, vce(robust)
* To check the AIC statistic 
estat ic

* Model 5: Ologit - Robustness check using UCDP dataset (full model)
ologit clashfuture ucdp_5km vioaffected trustpolice armscommon hhecon relig age1 gender1 married, vce(robust)
* To check the AIC statistic 
estat ic

* Model 6: Ologit - Robustness check using GTD dataset (full model)
ologit clashfuture gtd_5km vioaffected trustpolice armscommon hhecon relig age1 gender1 married, vce(robust)
* To check the AIC statistic 
estat ic



// Table A2: Replicating the results in Table 3 using 5km buffer

* Model 1: LPM - Baseline - Ethnoreligious salience
regress cultural_salience acled_vio_incid_5km, vce(robust)	
* To check the AIC statistic 
estat ic

* Model 2: LPM - Adding controls for past victimization, state capacity and gun proliferation
regress cultural_salience acled_vio_incid_5km vioaffected trustpolice armscommon, vce(robust)	
* To check the AIC statistic 
estat ic

* Model 3: LPM - Adding controls for household income and demographic characteristics (full model)
regress cultural_salience acled_vio_incid_5km vioaffected trustpolice armscommon hhecon relig age1 gender1 married, vce(robust)	
* To check the AIC statistic 
estat ic

* Model 4: LPM - UCDP (full model)
regress cultural_salience ucdp_5km vioaffected trustpolice armscommon hhecon relig age1 gender1 married, vce(robust)	
* To check the AIC statistic 
estat ic

* Model 5: LPM - GTD (full model)
regress cultural_salience gtd_5km vioaffected trustpolice armscommon hhecon relig age1 gender1 married, vce(robust)	
* To check the AIC statistic 
estat ic



// Table A3: Replicating the results in Table 2 using a binary operationalization of expected victimization and linear probability model (LPM)

* Model 1: LPM - baseline
regress bin_clashfuture acled_vio_incid_10km, vce(robust)	
* To check the AIC statistic 
estat ic

* Model 2: LPM - Adding controls for past victimization, state capacity & gun proliferation
regress bin_clashfuture acled_vio_incid_10km vioaffected trustpolice armscommon, vce(robust)
* To check the AIC statistic 
estat ic

* Model 3: LPM - Adding controls for household income and demographic characteristics (full model)
regress bin_clashfuture acled_vio_incid_10km vioaffected trustpolice armscommon hhecon relig age1 gender1 married, vce(robust)
* To check the AIC statistic 
estat ic

* Model 4: LPM - Robustness check using UCDP dataset (full model)
regress bin_clashfuture ucdp_10km vioaffected trustpolice armscommon hhecon relig age1 gender1 married, vce(robust)
* To check the AIC statistic 
estat ic

* Model 5: LPM - Robustness check using GTD dataset (full model)
regress bin_clashfuture gtd_10km vioaffected trustpolice armscommon hhecon relig age1 gender1 married, vce(robust)
* To check the AIC statistic 
estat ic



// Figure A1: Average marginal effects of violent conflict on expected victimization (UCDP & GTD)

* Panel A: UCDP
ologit clashfuture ucdp_10km vioaffected trustpolice armscommon hhecon relig age1 gender1 married, vce(robust)
* To obtain the linear margins plot for conflicts ranging from 0 to 15, at intervals of 25:
* To obtain the marginal effects
margins, dydx(ucdp_10km)
* To plot the marginal effects as a bar chart with confidence intervals
marginsplot, recast(bar) yline(0) name (ucdp_10km, replace)

* Panel B: GTD
ologit clashfuture gtd_10km vioaffected trustpolice armscommon hhecon relig age1 gender1 married, vce(robust)
* To obtain the marginal effects
margins, dydx(gtd_10km)
* To plot the marginal effects as a bar chart with confidence intervals
marginsplot, recast(bar) yline(0) name (gtd_10km, replace)

* To combine the two graphs
graph combine  ucdp_10km gtd_10km








